package eraserhead.xml.request;

import xml.Message;
import client.ServerAccess;

/**
 * Class for sending a Remove request.
 * @author Michael Checca
 */
public class RemoveRequest {
	/**
	 * Sends a RemoveRequest to the server.
	 * @param sa {@link ServerAccess} to send request the {@link Message to}
	 * @param key Admin key
	 * @param id Event id to delete
	 */

	public static void send(ServerAccess sa, String key, String id) {
		String xmlMessage = String.format("%s<removeRequest id=\"%s\" key=\"%s\"/></request>",
				Message.requestHeader(), id, key);
		sa.sendRequest(new Message(xmlMessage));
	}
}
